using Domain.Common;
using Infrastructure;
using Newtonsoft.Json;

namespace Domain.Model
{
	/// <summary>
	///     Describes a contact.
	/// </summary>
	public class Contact : AggregateRoot
	{
		public CommunicationPoint CommunicationPoint = CommunicationPoint.Empty;
		public string Nickname
		{
			get;
			set;
		}

		public static string Serialize(Contact contact)
		{
			return JsonConvert.SerializeObject(contact);
		}

		public static Contact Deserialize(string description)
		{
			return JsonConvert.DeserializeObject<Contact>(description);
		}
	}
}